home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / aviwin / form1.frm (.txt) < prev   
Encoding:
Visual Basic Form  |  1995-05-08  |  4.1 KB  |  138 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "AVI Viewer"
  4.    ClientHeight    =   4020
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1770
  7.    ClientWidth     =   7365
  8.    Height          =   4710
  9.    Left            =   1035
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4020
  12.    ScaleWidth      =   7365
  13.    Top             =   1140
  14.    Width           =   7485
  15.    Begin FileListBox File1 
  16.       Height          =   1785
  17.       Left            =   5775
  18.       TabIndex        =   7
  19.       Top             =   315
  20.       Width           =   1485
  21.    End
  22.    Begin DriveListBox Drive1 
  23.       Height          =   315
  24.       Left            =   3990
  25.       TabIndex        =   6
  26.       Top             =   2310
  27.       Width           =   3270
  28.    End
  29.    Begin DirListBox Dir1 
  30.       Height          =   1830
  31.       Left            =   3990
  32.       TabIndex        =   5
  33.       Top             =   315
  34.       Width           =   1590
  35.    End
  36.    Begin CommandButton Command3 
  37.       Caption         =   "Pause"
  38.       Height          =   435
  39.       Left            =   1575
  40.       TabIndex        =   4
  41.       Top             =   3045
  42.       Width           =   750
  43.    End
  44.    Begin PictureBox MMControl1 
  45.       BackColor       =   &H000000FF&
  46.       Height          =   1000
  47.       Left            =   0
  48.       ScaleHeight     =   975
  49.       ScaleWidth      =   975
  50.       TabIndex        =   3
  51.       Top             =   0
  52.       Width           =   1000
  53.    End
  54.    Begin CommandButton Command2 
  55.       Caption         =   "Stop"
  56.       Height          =   435
  57.       Left            =   2415
  58.       TabIndex        =   0
  59.       Top             =   3045
  60.       Width           =   750
  61.    End
  62.    Begin CommandButton Command1 
  63.       Caption         =   "Play"
  64.       Height          =   435
  65.       Left            =   735
  66.       TabIndex        =   1
  67.       Top             =   3045
  68.       Width           =   750
  69.    End
  70.    Begin PictureBox Picture1 
  71.       Height          =   2325
  72.       Left            =   210
  73.       ScaleHeight     =   2295
  74.       ScaleWidth      =   3450
  75.       TabIndex        =   2
  76.       Top             =   315
  77.       Width           =   3480
  78.    End
  79.    Begin Label Label1 
  80.       Caption         =   "Search: *.AVI"
  81.       Height          =   225
  82.       Left            =   6090
  83.       TabIndex        =   8
  84.       Top             =   105
  85.       Width           =   1170
  86.    End
  87.    Begin Menu mnuAbout 
  88.       Caption         =   "About"
  89.       Begin Menu mnuAVIView 
  90.          Caption         =   "About AVI Viewer..."
  91.       End
  92.    End
  93. Declare Function mciSendString Lib "mmsystem" (ByVal lpstrCommand$, ByVal lpstrReturnStr As Any, ByVal wReturnLen%, ByVal hCallBack%) As Long
  94. Sub Command1_Click ()
  95.     MMControl1.FileName = File1.Path & "\" & File1
  96.     MMControl1.Command = "Open"
  97.     'Put window handle in CmdStr$
  98.     CmdStr$ = "window " + MMControl1.FileName + " handle " + Format$(picture1.hWnd)
  99.     'Send window handle to mciSendString
  100.     ReturnVal& = mciSendString(CmdStr$, 0&, 0, 0&)
  101.     'Put output in window
  102.     CmdStr$ = "put " + MMControl1.FileName + " destination "
  103.     ReturnVal& = mciSendString(CmdStr$, 0&, 0, 0&)
  104.     MMControl1.Command = "Prev"
  105.     MMControl1.Command = "Play"
  106. End Sub
  107. Sub Command2_Click ()
  108.     MMControl1.Command = "Stop"
  109. End Sub
  110. Sub Command3_Click ()
  111.     MMControl1.Command = "Pause"
  112. End Sub
  113. Sub Dir1_Change ()
  114.     File1.Path = Dir1.Path
  115. End Sub
  116. Sub Drive1_Change ()
  117.     Dir1.Path = Drive1.Drive
  118. End Sub
  119. Sub File1_Click ()
  120.     MMControl1.Command = "Close"
  121.     MMControl1.FileName = File1.Path & "\" & File1
  122. End Sub
  123. Sub File1_DblClick ()
  124.     MMControl1.Command = "Close"
  125.     MMControl1.FileName = File1.Path & "\" & File1
  126.     Command1.Value = True
  127. End Sub
  128. Sub Form_Load ()
  129.     File1.Pattern = "*.AVI"
  130.     MMControl1.Notify = False
  131.     MMControl1.Wait = True
  132.     MMControl1.Shareable = False
  133.     MMControl1.DeviceType = "AVIVideo"
  134. End Sub
  135. Sub mnuAVIView_Click ()
  136.     MsgBox "AVI Viewer by Dustin Callaway" + Chr(10) + "CompuServe ID# 72154,2326", 64, "About AVI Viewer"
  137. End Sub
  138.